<%@page import="aex.domain.ShowPoint"%>
<%@page import="aex.util.PageBean"%>
<%@page import="aex.service.ArticleService"%>
<%@page import="aex.domain.ArticleCategory"%>
<%@page import="aex.domain.Article"%>
<%@page import="aex.service.ShowViewService"%>
<%@page import="aex.util.SSHUtil"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="aex.domain.Puser"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	WebApplicationContext ac = SSHUtil.getApplication(request);
	ShowViewService svService = (ShowViewService) ac.getBean(ShowViewService.SERVICE_NAME);
	ArticleService artService=(ArticleService)ac.getBean(ArticleService.SERVICE_NAME);
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta name="keywords" content="${webKeyWord}">
	<meta name="description" content="${webDescription}" />
	<title> ${webTitle} </title>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
  	
	<link rel="stylesheet" type="text/css" href="expandStyle/aex_userPage.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/index.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/topics.css" />
	
	<script type="text/javascript" src="systemJs/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="expandStyle/aex_userPage.js"></script>
	</head>
  <body>
    
    <!--导航栏-->
    
    <%
    	Puser user=(Puser)request.getSession().getAttribute("user");
    	if(user==null){
    		%>
    			<jsp:include page="/systemPage/headNavVisitor1.jsp"></jsp:include>		
    		<%
    	}else{
    		%>
				<jsp:include page="/systemPage/headNavVisitor2.jsp"></jsp:include>
    		<%
    	}
    %>

 <!--主要内容-->
  <div class="container">
  	 <div class="container_left">
  	    <!--专题-->
  	  <%
  	  	PageBean<ShowPoint> pageBean=(PageBean<ShowPoint>)request.getAttribute("pageBean");
  	  	for(ShowPoint showPoint:pageBean.getObjList()){
  	  		Article art=artService.findByID(showPoint.getSpTargetId());
  	  		out.print(
  	  				" <div class='topics_show'>"+
			           "<div class='topics_tittle'>"+
			             "<div>"+art.getArticleCategory().getAcName()+"<img src='images/aex_userImg/jiantou.png' align='right'></div>"+
			             "<h2><a href='visitor/visitor_article.do?arId="+art.getArId()+"'>"+art.getArTitle()+"</a></h2>"+
			           "</div>"+	  
			           "<div class='topics_img'><a href='visitor/visitor_article.do?arId="+art.getArId()+"'><img src='"+art.getArAuthor()+"' width='710px' height='250'></a></div>"+
			          " <div class='topics_cont'>"+
			               	art.getArAbstract()+
			          "</div>"+
			           "<div class='topics_info'>"+
			            "<div id='topics_like'>"+art.getArLike()+"喜欢</div><div id='topics_time'>"+art.getArTime()+"</div><div id='topics_author'>"+art.getPuser().getPuName()+"</div>"+
			           "</div>"+
			        "</div>");
  	  	}
  	  %>
        <!--页数-->
        <jsp:include page="/systemPage/paginationAdmin.jsp"></jsp:include>
  	 </div>
  	  <!-- 侧边栏 -->
  	 <jsp:include page="/systemPage/cbl1.jsp"></jsp:include>
  	 
  </div>
    <!--网站底部-->
	<jsp:include page="/systemPage/footerVisitor.jsp"></jsp:include>
  </body>
</html>
